1. Field of the Invention
The present invention relates to an image reading apparatus which uses a photoelectric device such as a charge-coupled device (CCD) or the like, and generates an image signal from an original image, and, in particular, to an image reading apparatus which performs correction, using data of a black reference level, on image data obtained from the original image through the photoelectric device.
2. Description of the Related Art
An image reading apparatus in the related art, which apparatus uses a photoelectric device such as a charge-coupled device (CCD) or the like, and generates an electric image signal from an original image, performs a correction, using data of a black reference level, on image data obtained from the original image through the photoelectric device. The method thereof will now be described.
Generally speaking, an image signal outputted from a CCD includes a signal component due to a dark current which does not change due to change in an amount of light received by the CCD, and a signal component which changes in accordance with the change in the amount of light received by the CCD. A signal component which is effective for image processing is only the signal component which changes in accordance with the change in the amount of light received by the CCD. Accordingly, in order to obtain the signal component which is to be outputted to a following image processing circuit, it is necessary to perform the correction (black shading correction) to subtract the data of the signal component due to the dark current from the data of the image signal outputted from the CCD.
The signal component due to the dark current can be obtained as a result of outputs of an optical black (OPB) portion provided as part of a line of photoelectric sensors of the CCD (scan beginning part in a main scan direction, as shown in FIG. 1) being averaged, before the CCD reads the original image, for each line, for example. The OPB portion provided as the part of the line of the photoelectric sensors of the CCD is obtained as follows: Aluminum deposition is performed on several (for example, eight, sixteen, or the like) photoelectric sensors of the line of the (for example, thousands of) photoelectric sensors of the CCD, each photoelectric sensor corresponding to a pixel, which several photoelectric sensors are arranged at the end at which scanning in the main scan direction begins. Thereby, these several photoelectric sensors of the CCD are covered by the aluminum film, and, as a result, are shielded from light, and, thus, no light is received by these several photoelectric sensors of the CCD. Thereby, the data of the black reference level can be obtained using the data obtained from the several photoelectric sensors of the OPB portion of the CCD.
FIG. 2 is a block diagram showing essential portions of one example of an image reading apparatus including a black shading correction portion for performing the above-mentioned correction (black shading correction) in the related art.
The image reading apparatus shown in FIG. 2 includes a CCD portion 1 which comprises a CCD including a line of photoelectric sensors extending in the main scan direction, and generates an image signal from an original image as a result of reading the original image. The reading of the original image is performed as follows: The CCD portion 1 scans a first line of the original image in the main scan direction along the line of the photoelectric sensors of the CCD (whereby image data of the first line is obtained) and scans the original image in the sub-scan direction (perpendicular to the main scan direction) by sequentially scanning subsequent lines of the original image (whereby image data of respective lines, i.e., a second line, a third line, . . . , an n-th line, is obtained in sequence). The CCD of the CCD portion 1 is the same as the above-described CCD having the OPB portion. The image reading apparatus further includes a signal processing portion 2 which performs processing of an analog image signal outputted from the CCD portion 1, an A-D converting portion 3 which is an A-D converter converting the analog image signal into a digital image signal, a peak hold (P/H) portion 4 for detecting a background level of the original image, a black shading correction portion 5 which performs the correction, using the data of the black reference level, on the image signal, and a white shading correction portion 6 which performs white shading correction on the image signal. Further, the black shading correction portion 5 includes an average-value calculating circuit 7 which calculates the average of the outputs of the CCD portion 1 during the period during which the CCD portion 1 obtains data (to be used for obtaining the black reference level) through the photoelectric sensors of the above-mentioned OPB portion of the CCD, and a subtracter 8 which subtracts the average calculated by the average-value calculating circuit from the data of the image signal obtained from the original image.
In FIG. 2, the image analog signal outputted by the CCD portion 1 undergoes signal processing through the signal processing portion 2, and, then, is converted into the digital image signal by the A-D converting portion 3. The digital image signal outputted from the A-D converting portion 3 is inputted to the black shading correction portion 5, undergoes the black shading correction therethrough, and, then, is outputted. The image signal outputted from the black shading correction portion 5 is inputted to the white shading correction portion 6. The white shading correction portion 6 performs the white shading correction on the data of the thus-inputted image signal using white reference data which was obtained using a white reference plate or the like. Then, the image signal is inputted to an image processing block (not shown in the figure).
In the black shading correction portion 5, the average calculating circuit 7 calculates the average of the outputs from the OPB portion in the CCD portion 1 as the data of the reference black level at the beginning of reading of an original image for each line, and outputs the thus-calculated average Dopb (the average of the pixel values (of the OPB portion) in the main scan direction). The subtracter 8, which has received the average Dopb, subtracts the average Dopb from the data D0 of the image signal (outputted from the A-D converting portion 3 when the original image is read), and outputs the thus-obtained data to the white shading correction portion 6. Thus, the black shading correction portion 5 averages the data outputted from the OPB portion of the CCD portion 1 for each line, and, thereby, obtains the data of the black reference level to be used for the black shading correction to eliminate the black offset from the image signal. The calculation of the average performed by the average calculating circuit 7 is performed only during the period during which the average calculating circuit receives an OPBGATE signal, which is provided to the average calculating circuit 7 only during the period during which data obtained from the OPB portion in the CCD portion 1 is outputted from the CCD portion 1.
As shown in FIG. 2, the peak hold (P/H) portion 4 is connected between the signal processing portion 2 and the A-D converting portion 3. The peak hold portion 4 holds the peak value of the output from the signal processing portion 2, and provides the peak value to the A-D converting portion 3 as the reference voltage of the A-D converting portion 3. Thus, the peak hold portion 4 detects the color level of the background of the original image, and provides the thus-detected level to the A-D converting portion 3 as the reference voltage. Thereby, the influence of the color of the background of the original image on the image signal outputted from the A-D converting portion 3 is eliminated.
The peak value of the image signal varies due to variation in the color of the background of the original image. In many cases, the original image read by the image reading apparatus is an image printed on a paper sheet. In such a case, the above-mentioned color of the background of the original image is the color of this paper sheet. The color of the paper sheet on which the original image was printed is ordinarily white. However, there is a case where the color of the paper sheet on which the original image was printed is not white, but is red, for example. Therefore, the peak value of the image signal varies as the color of the paper sheet on which the original image was printed varies. As a result, the output of the peak hold portion 4 varies, and, accordingly, the reference voltage of the A-D converting portion 3 varies. Thereby, the output from the A-D converting portion 3 varies. As a result, the level of the black offset which should be eliminated from the image signal through the black shading correction performed by the black shading correction portion 5 varies. Therefore, the black shading correction to eliminate the black offset from the image signal performed by the black shading portion 5 should be performed at the same time (in real time) the image signal obtained when the background of the original image is read is processed.
However, the number of the photoelectric sensors of the CCD which can be used as the OPB portion is limited, because almost all of the photoelectric sensors are used for reading the original image and the photoelectric sensors used as the OPB portion cannot be used for reading the original image. Therefore, when the signal-to-noise ratio (S/N ratio) of the image reading apparatus is bad, variation in the average of the outputs of the photoelectric sensors of the OPB portion occurs due to the noise. Thereby, the black reference level used for the black shading correction may vary for each line due to the noise. When the black reference level varies for each line due to the noise, the following situation occurs: Although the black offset level of the original image does not vary or varies smoothly in the sub-scan direction, a pattern of lateral stripes develops in the image represented by the image signal, because the black reference level used for the black shading correction varies for each line due to the noise, and, thereby, the level of the image signal obtained through the black shading correction varies for each line.